package com.laamella.syntherface.synths.alesis.micron;

import javax.swing.JPanel;

import com.laamella.syntherface.synths.Syntherface;
import com.laamella.syntherface.synths.alesis.micron.gui.EditPanel;
import com.laamella.syntherface.synths.alesis.micron.gui.HelpFrame;
import com.laamella.syntherface.synths.alesis.micron.model.Patch;
import com.laamella.syntherface.synths.events.SynthWideEvents;
import com.laamella.syntherface.synths.midi.MidiInterface;

public class AlesisMicron extends Syntherface {

	private Patch patch;
	private EditPanel editPanel;
	private MidiInterface midiInterface;
	
	private HelpFrame helpFrame=new HelpFrame();

	@Override public JPanel constructSyntherface(MidiInterface midiInterface) {
		SynthWideEvents.newParameterRegistered().listeners.add(helpFrame);
		this.midiInterface=midiInterface;
		editPanel = new EditPanel();
		patch= new Patch(midiInterface);
		editPanel.setModel(patch);
		return editPanel;
	}

	@Override public String getSynthName() {
		return "Micron";
	}

	@Override public String getSynthCreator() {
		return "Alesis";
	}

	@Override public String getInterfaceDescription() {
		return "Interface based on the Ion signal flow diagram."; 
	}

	@Override public String getComments() {
		return "Made in 2008 by Danny van Bruggen/Laamella Gad";
	}

	@Override public void receivePatch() throws Exception {
		patch.readSettingsFromSysEx();
		
	}

	@Override public void help() {
		helpFrame.setVisible(true);
	}

}
